package com.wicket.okroperation.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okroperation.biz.service.SecurityService;
import com.wicket.okroperation.biz.service.dto.req.*;
import com.wicket.okroperation.biz.service.dto.res.*;
import com.wicket.okroperation.common.ro.OkrResult;
import com.wicket.okroperation.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/operation/security/")
public class SecurityController {

  @Autowired
  SecurityService securityService;
/**
   * D6执行刷软件授权证书
   */
    @PostMapping("implementBrushSoftwareAuthorization")
    public OkrResult<ImplementBrushSoftwareAuthorizationRespDto> implementBrushSoftwareAuthorization(@RequestBody @Validated ImplementBrushSoftwareAuthorizationReqDto reqDTO){
    return OkrResult.success(securityService.implementBrushSoftwareAuthorization(reqDTO));
    }
/**
   * D6查询软件授权证书列表
   */
    @PostMapping("querySoftwareAuthorizationList")
    public OkrResult<QuerySoftwareAuthorizationListRespDto> querySoftwareAuthorizationList(@RequestBody @Validated QuerySoftwareAuthorizationListReqDto reqDTO){
    return OkrResult.success(securityService.querySoftwareAuthorizationList(reqDTO));
    }
/**
   * D6新增软件授权证书(公共)
   */
    @PostMapping("addSoftwareAuthorizationCom")
    public OkrResult<AddSoftwareAuthorizationComRespDto> addSoftwareAuthorizationCom(@RequestBody @Validated AddSoftwareAuthorizationComReqDto reqDTO){
    return OkrResult.success(securityService.addSoftwareAuthorizationCom(reqDTO));
    }
/**
   * D6查询软件授权证书详情
   */
    @PostMapping("querySoftwareAuthorizationDetail")
    public OkrResult<QuerySoftwareAuthorizationDetailRespDto> querySoftwareAuthorizationDetail(@RequestBody @Validated QuerySoftwareAuthorizationDetailReqDto reqDTO){
    return OkrResult.success(securityService.querySoftwareAuthorizationDetail(reqDTO));
    }
/**
   * D6修改软件授权证书
   */
    @PostMapping("updateSoftwareAuthorization")
    public OkrResult<UpdateSoftwareAuthorizationRespDto> updateSoftwareAuthorization(@RequestBody @Validated UpdateSoftwareAuthorizationReqDto reqDTO){
    return OkrResult.success(securityService.updateSoftwareAuthorization(reqDTO));
    }
/**
   * D6删除软件授权证书
   */
    @PostMapping("deleteSoftwareAuthorization")
    public OkrResult<DeleteSoftwareAuthorizationRespDto> deleteSoftwareAuthorization(@RequestBody @Validated DeleteSoftwareAuthorizationReqDto reqDTO){
    return OkrResult.success(securityService.deleteSoftwareAuthorization(reqDTO));
    }
/**
   * D6存档软件授权证书
   */
    @PostMapping("archiveSoftwareAuthorization")
    public OkrResult<ArchiveSoftwareAuthorizationRespDto> archiveSoftwareAuthorization(@RequestBody @Validated ArchiveSoftwareAuthorizationReqDto reqDTO){
    return OkrResult.success(securityService.archiveSoftwareAuthorization(reqDTO));
    }
/**
   * D6生成License(公共)
   */
    @PostMapping("addGenerateLicenseCom")
    public OkrResult<AddGenerateLicenseComRespDto> addGenerateLicenseCom(@RequestBody @Validated AddGenerateLicenseComReqDto reqDTO){
    return OkrResult.success(securityService.addGenerateLicenseCom(reqDTO));
    }
/**
   * D6查询安全License详情
   */
    @PostMapping("querySecurityLicenseDetail")
    public OkrResult<QuerySecurityLicenseDetailRespDto> querySecurityLicenseDetail(@RequestBody @Validated QuerySecurityLicenseDetailReqDto reqDTO){
    return OkrResult.success(securityService.querySecurityLicenseDetail(reqDTO));
    }
/**
   * D6查询安全License详情(公共)
   */
    @PostMapping("querySecurityLicenseDetailCom")
    public OkrResult<QuerySecurityLicenseDetailComRespDto> querySecurityLicenseDetailCom(@RequestBody @Validated QuerySecurityLicenseDetailComReqDto reqDTO){
    return OkrResult.success(securityService.querySecurityLicenseDetailCom(reqDTO));
    }
}
